﻿<%@ Page Language="C#" MasterPageFile="~/MP.master" AutoEventWireup="true" CodeFile="Edit.aspx.cs"
    Inherits="XML_Edit" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MP1" runat="Server">
    <div id="dv-parameter">
        <div class="box">
            <table>
                <tr>
                    <td>Name Space</td>
                    <td>
                        <input type="text" id="txtNameSpace" class="txt" style="width: 300px;" value="AutoTicketLibrary.XmlObject" />
                    </td>
                    <td>Generate Type</td>
                    <td>
                        <input type="radio" id="GenC" name="GenType" checked="checked" /><label for="GenC">Class</label><input
                            type="radio" name="GenType" id="GenS" /><label for="GenS">Data Set</label>
                    </td>
                </tr>
            </table>
        </div>
        <div class="box-option" style="margin-top: 5px;">
            XML
        </div>
        <div class="box">
            <textarea id="txtXml" rows="10" cols="20" style="width: 99.9%; border-width: 0px;height:300px;"><?xml version="1.0"?>
<BannerCollections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05">
  <Setup>
    <Key>Admin/Index.aspx,1,en-us</Key>
    <BannerID>1000</BannerID>
  </Setup>
  <Setup>
    <Key>Admin/Index.aspx,2,en-us</Key>
    <BannerID>100</BannerID>
  </Setup>
  <Banner>
    <ID>1</ID>
    <IsFlash>True</IsFlash>
    <URL>http://www.baidu.com</URL>
    <Target>http://www.baidu.com</Target>
  </Banner>
  <Banner>
    <ID>2</ID>
    <IsFlash>True</IsFlash>
    <URL>http://www.baidu.com</URL>
    <Target>http://www.baidu.com</Target>
  </Banner>
</BannerCollections></textarea>
        </div>
        <div style="text-align: right;margin-top:5px;">
            <input type="button" value="Generate" onclick="GenCodeByXml();" class="btn5" />
        </div>
    </div>
    <div class="box-option" style="margin-top: 5px;">
        Code
    </div>
    <div class="box" id="dv-code">
        <textarea id="txtCode" rows="18" cols="10" style="width: 99.9%; border-width: 0px;height:200px;"></textarea>
    </div>
    <script language="javascript">
        function GenCodeByXml() {
            CommonCall('Callback/XML/Edit.aspx', 0, 'dv-code', 'dv-parameter', 'dv-parameter', 'XML_', '&ns=' + oa('txtNameSpace') + '&xml=' + oa('txtXml') + (o('GenS').checked ? '&isds=1' : ''), 'text', function () {
                $('#dv-code').hide().fadeIn();
            });
        }
    </script>

</asp:Content>
